"""
类名：LoginAPI
类属性：login_url：保存登陆的url，"http://ihrm-test.itheima.net/api/sys/login"
类方法：
    def login(cls, body)：
        # 功能：发送登陆请求
        # :param body: 发送请求的请求体
        # :return: 发送登陆请求后的响应对象
"""
import requests

from config import BASE_URL


class LoginAPI(object):
    login_url = BASE_URL + "/api/sys/login"

    # @classmethod
    # def login(cls, mobile, password):
    #     body = {
    #         'mobile': mobile,
    #         'password': password
    #     }
    #     response = requests.post(cls.login_url, json=body)
    #     return response

    @classmethod
    def login2(cls, body):
        response = requests.post(cls.login_url, json=body)
        return response



